﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkyFab.Master" AutoEventWireup="true" CodeBehind="VendorPOList.aspx.cs" Inherits="Web.VendorPOList" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SubMenuPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<h1>Vendor PO List</h1>
<div class="span-18">
<fieldset>
    <legend>Search Vendor PO</legend>

    <p>
    <label>Search By PO No.:</label>
    <asp:TextBox ID="SearchTextBox" runat="server" CssClass="text" Width="370"></asp:TextBox>
    <asp:Button ID="SearchButton" Text="Search" runat="server" 
                    onclick="SearchButton_Click" CssClass="submitButton" />
    </p>

    <p>
    <label>Or Search By Time: From </label>
    <asp:TextBox ID="FromTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
                <asp:CalendarExtender ID="FromTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="FromTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
    <label>To </label>
    <asp:TextBox ID="ToSearchTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
                    <asp:CalendarExtender ID="ToTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="ToSearchTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
                <asp:Button ID="SearchButton1" Text="Search" runat="server" 
                    onclick="SearchButton1_Click" CssClass="submitButton"/>
    </p>
    </fieldset>
    </div>
      <div class="span-18">
    <h3>Search Result:</h3>
    <p>
     <asp:GridView ID="VendorPOListGridView" runat="server" CellPadding="4" 
                    GridLines="None" AutoGenerateColumns="False" 
                    AllowPaging="True" 
                    onpageindexchanging="VendorPOListGridView_PageIndexChanging" 
                    CssClass="gridview" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                    <asp:TemplateField HeaderText="PO No.">
                            <ItemTemplate>
                                <asp:HyperLink ID="PONoHyperLink" runat="server" NavigateUrl='<%# "VendorPODetail.aspx?vendPOid="+Eval("Id") %>'><%# Eval("No")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="VendorShortName" HeaderText="Vendor" />
                       
                        <asp:BoundField DataField="Date" HeaderText="Date"  DataFormatString="{0:d MMM, yyyy}" />
                        <asp:BoundField DataField="Type" HeaderText="Order Type" />
                        <asp:BoundField DataField="Amount" HeaderText="Amount" />
                        

                        <asp:TemplateField Visible="False">
                            <ItemTemplate>
                                <asp:HiddenField ID="IdHiddenField" runat="server" Value='<%#Eval("Id")%>'/>
                            </ItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
    </p>
    </div>
</asp:Content>
